package com.carlos.company.controller;

import com.carlos.company.mapper.CompanyMapper;
import com.carlos.company.pojo.Company;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author 李健成
 * @date 2021/9/27
 */

@RestController
@RequestMapping("/company")
public class CompanyController {

    @Autowired
    private CompanyMapper mapper;

    @GetMapping("")
    public List<Company> list() {
        return mapper.selectList(null);
    }

}
